<?php
/**
 * XiteCode submit button widget
 *
 * Use:<br />
 * <code>
 * {Submit id="id" [value="value" noback="yes"]]}
 * </code>
 */

function smarty_function_Submit($params, &$Smarty)
{
  $value  = 'Submit';
  $goBack = '&nbsp;&nbsp;<input type="button" value="Go Back" onclick="history.go(-1)" />';

  if (!empty($params['value'])) {
    $value = $params['value'];
  }

  if (!empty($params['noback'])) {
    $goBack = '';
  }

  return '<input type="submit" id="'.$Smarty->_currentForm.'" value="'.$value.'" />'.$goBack.'<br />';
}

?>
